using System;
using System.Text;

namespace DriverSVH
{
    public class SVHFirmwareInfo
    {
        //! 4 bytes identifier
        public string svh;
        //! Major version number
        public ushort version_major;
        //! Minor version number
        public ushort version_minor;
        //! 48 bytes! of text (free)
        public string text;

        public SVHFirmwareInfo(byte[] data)
        {
            svh = Encoding.UTF8.GetString(data,0, 4);
            //Debug.Log(svh);
            version_major = BitConverter.ToUInt16(data, 4);
            version_minor = BitConverter.ToUInt16(data, 6);
            text = Encoding.UTF8.GetString(data, 8,data.Length - 8);
        }
    }


}
